package com.kun.mapper;

import com.kun.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface UserMapper {


    public List<User> selectAllUsers();

    public Integer updateUser(User user);

    public Integer deleteUserById(Integer id);

    public Integer addUser(User user);

    /**
     * 根据条件模糊查询
     * @param map
     * @return
     */
    public List<User> queryByLimit(Map map);

    /**
     * 根据条件查询
     * @param map
     * @return
     */
    public List<User> selectByLimit(Map map);

    /**
     * 根据条件模糊查询,计算总数
     * @param map
     * @return
     */

    public List<User> calCountByConditions(Map map);

    public User selectUserById(int id);

}
